home *** CD-ROM | disk | FTP | other *** search
/ Comix Games / Comix Games.iso / jetsons / jetsons.exe / jetsons.dxr / 00034.ls < prev    next >
Encoding:
Text File  |  1996-11-19  |  763 b   |  17 lines

  1. on CheckCollisions
  2.   global theFirstBuildingChannel, theLastBuildingChannel, theFirstShipChannel, theBackgroundVelocity, theOtherShipVelocity
  3.   repeat with h = theFirstBuildingChannel to theLastBuildingChannel
  4.     if sprite h intersects theFirstShipChannel then
  5.       if ((theBackgroundVelocity < 0) and (the left of sprite theFirstShipChannel < the left of sprite h)) or ((theBackgroundVelocity > 0) and (the right of sprite theFirstShipChannel > the right of sprite h)) then
  6.         PlayBounceSound()
  7.         set theBackgroundVelocity to -theBackgroundVelocity
  8.         set temp to theOtherShipVelocity
  9.         set theOtherShipVelocity to 0
  10.         DoEveryFrame()
  11.         set theOtherShipVelocity to temp
  12.         return 
  13.       end if
  14.     end if
  15.   end repeat
  16. end
  17.